<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>成员管理</title>
    <link href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
</head>
<body>
<div class="container">
    <jsp:include page="_Chair.jsp" />
</div>

<div class="right_col" role="main" style="height:656px">
    <div class="row">
        <div class="col-md-12">
            <ul class="list-inline">
                <li>成员管理</li>
                <li>/</li>
                <li>成员操作</li>
            </ul>

            <hr>
            <form role="form" class="form-horizontal" action="${pageContext.request.contextPath}/chair/showMemberTwo" method="post">
                <div class="row">
                    <div class="col-md-2">
                        <div class="form-group">
                            <div >
                                <input type="text" placeholder="成员编号" class="form-control" id="memberNo" name="memberNo" required>
                            </div>
                        </div>
                    </div>

                    <div class="col-md-0.5"></div>
                    <div class="col-md-2">
                        <div class="form-group">
                            <div>
                                <button type="submit" class="btn btn-primary">搜索成员</button>
                                <p><h3 color="red" size="2px">${showMessage }</h3></p>
                            </div>
                        </div>
                    </div>
                    <div class="col-md-5">
                    </div>
                </div>

            </form>

            <table class="table">
                <thead>
                <tr>
                    <th>成员编号</th>
                    <th>成员姓名</th>
                    <th>性别</th>
                    <th>所在院系</th>
                    <th>联系电话</th>
                    <th>部门</th>
                </tr>
                </thead>

                <tbody>
                <c:forEach items="${memberList }" var="member">
                    <tr>
                        <td>${member.memberNo}</td>
                        <td>${member.studentName }</td>
                        <td>${member.sex }</td>
                        <td>${member.collegeNa}</td>
                        <td>${member.phone }</td>
                        <td>${member.departmentNa }</td>
                        <td>
                            <a class="btn btn-info btn-xs" href="<c:url value="/chair/modifyMember?id=${member.memberNo }"/>"><i class="fa fa-pencil"></i>修改</a>
                            <a class="btn btn-danger btn-xs" href="<c:url value="/chair/deleteMember?id=${member.memberNo}"/>"><i class="fa fa-trash-o"></i>删除</a>
                        </td>
                    </tr>
                </c:forEach>
                </tbody>
            </table>


        </div>
    </div>

</div>
</body>
</html>